<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<%@ taglib prefix="t" uri="/easyui-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%>
<%@page import="org.jeecgframework.core.util.FileUtils"%>
<%@page import="com.buss.FrontController.FrontArticleInfoController"%>

<%
// 	String lang = org.jeecgframework.core.util.BrowserUtils.getBrowserLanguage(request);
// String langurl = "plug-in/mutiLang/" + lang +".js";
String Id = request.getParameter("Id");
// session.setAttribute("lang", lang);
String path2 = request.getContextPath();
String basePath2 = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path2;

// 网站访问统计
// 	FrontArticleInfoController CountFileHandler = new FrontArticleInfoController();//创建对象
// 	  Integer count = (Integer)application.getAttribute("count");
// 	  if(count !=  null){
// 	  count = 1 + count;
// 	  }else{
// 	  count = 1;	 	
// 	  }
// 	  application.setAttribute("count",count);
// 	  request.setAttribute("count",count);
%>


<c:set var="webRoot" value="<%=basePath2%>" />
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<head>
<%@include file="head.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link href="plug-in/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="plug-in/umeditor/third-party/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/umeditor/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/umeditor/umeditor.min.js"></script>
<script type="text/javascript" src="plug-in/umeditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js?skin=metrole"></script>
<script type="text/javascript" src="js/common.js"></script>
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/style_1_common.css">
<link rel="stylesheet" href="css/umeditor_css.css">

<script type="text/javascript" src="js/zDrag.js"></script>
<script type="text/javascript" src="js/zDialog.js"></script>
<%-- <script src=<%=langurl%> type="text/javascript"></script> --%>

<style>
body {
	background: #ffffff;
	color: #444;
	font-size: 12px;
}

a {
	color: #07c;
	text-decoration: none;
	border: 0;
	background-color: transparent;
}

body, div, q, iframe, form, h5 {
	margin: 0;
	padding: 0;
}

img, fieldset {
	border: none 0;
}

body, td, textarea {
	word-break: break-all;
	word-wrap: break-word;
	line-height: 1.6;
}

body, input, textarea, select, button {
	margin: 0;
	font-size: 14px;
	font-family: Tahoma, SimSun, sans-serif;
}

div, p, table, th, td {
	font-size: 1em;
	font-family: inherit;
	line-height: inherit;
}

h5 {
	font-size: 12px;
}

ol li, ul li {
	margin-bottom: 0.5em;
}

pre, code {
	font-family: "Courier New", Courier, monospace;
	word-wrap: break-word;
	line-height: 1.4;
	font-size: 12px;
}

pre {
	background: #f6f6f6;
	border: #eee solid 1px;
	margin: 1em 0.5em;
	padding: 0.5em 1em;
}

#content {
	padding-left: 50px;
	padding-right: 50px;
}

#content h2 {
	font-size: 20px;
	color: #069;
	padding-top: 8px;
	margin-bottom: 8px;
}

#content h3 {
	margin: 8px 0;
	font-size: 14px;
	COLOR: #693;
}

#content h4 {
	margin: 8px 0;
	font-size: 16px;
	COLOR: #690;
}

#content div.item {
	margin-top: 10px;
	margin-bottom: 10px;
	border: #eee solid 4px;
	padding: 10px;
}

hr {
	clear: both;
	margin: 7px 0; +
	margin: 0;
	border: 0 none;
	font-size: 1px;
	line-height: 1px;
	color: #069;
	background-color: #069;
	height: 1px;
}

.infobar {
	background: #fff9e3;
	border: 1px solid #fadc80;
	color: #743e04;
}

.buttonStyle {
	width: 64px;
	height: 22px;
	line-height: 22px;
	color: #369;
	text-align: center;
	background: url(imges/popupimages/buticon.gif) no-repeat left top;
	border: 0;
	font-size: 12px;
}

.buttonStyle:hover {
	background: url(imges/popupimages/buticon.gif) no-repeat left -23px;
}
</style>
<link rel="stylesheet" href="css/index.css">
<title>贴子详情</title>
</head>
<body>
	<!--头部 -->


	<!-- <div id="scrolltop" style="left: 1440px; visibility: visible;"> -->
	<!-- 	<span hidefocus="true"><a title="对话" class="scrolltopa1"> -->
	<!-- 			<b>对话</b> -->
	<!-- 		</a></span> <span hidefocus="true"><a title="返回顶部" class="scrolltopa"> -->
	<!-- 			<b>返回顶部</b> -->
	<!-- 		</a></span> <span><a href="" hidefocus="true" class="returnboard" title="返回版块"> -->
	<!-- 			<b>返回版块</b> -->
	<!-- 		</a></span> -->
	<!-- </div> -->
	<div class="scroll_left">
		<ul class="post_share">
			<li style="border: none">
				<img src="imges/qunzu/comment.png"><span>分享到：</span>
				</a>
			</li>
			<li>
				<img src="imges/qunzu/yixin.jpg"><span>易信</span>
				</a>
			</li>
			<li>
				<img src="imges/qunzu/weixin.jpg"><span>微信</span>
				</a>
			</li>
			<li>
				<img src="imges/qunzu/QQ.jpg"><span>QQ空间</span>
				</a>
			</li>
			<li>
				<img src="imges/qunzu/weibo.jpg"><span>微博</span>
				</a>
			</li>
			<li>
				<img src="imges/qunzu/more.jpg"><span>更多</span>
				</a>
			</li>
		</ul>
	</div>

	<div style="width: 100%; height: auto; background: #f8f8f8; padding-bottom: 10px;">

		<div style="width: 960px; margin: 0 auto; color: #666; padding-top: 10px; padding-bottom: 10px">
			<img style="vertical-align: sub" src="imges/fangzi.png"> > <span> <a
					href="<%=request.getContextPath() + "/indexController.do?index"%>">论坛</a>> <a href="#">${areaInfo.areaName}</a>> <a href="#">${articleGroupInfo.articleGroupName}</a>>
				<a href="#">${articleInfo.title}</a>
			</span>
		</div>
		<div id="pgt" class="pgs mbm cl ">
			<div class="pgt">
				<div class="pgt_img">
					<img src="imges/fatie.jpg">
				</div>
				<div class="pg">
					<tfoot>
						<!-- 分页 -->
						<tr>
							<td colspan="4" class="align_c">
								<div class="_page">
									<%
									int pageNo = 0, bfNo = 0;
									String pageNoStr = request.getParameter("page");
									if (StringUtil.isEmpty(pageNoStr) || "1".equals(pageNoStr)) {
										pageNo = 1;
										bfNo = 1;
									} else {
										pageNo = Integer.parseInt(pageNoStr);
										bfNo = pageNo - 1;
									}
									String annCount = request.getAttribute("pageCount").toString();
									int P_pageCount = Integer.parseInt(annCount);
								%>
									<span id="info">共${pageCount }页|第<%=pageNo%>页
									</span>
									<a href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=1">首页</a>
									<a href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=bfNo%>">上一页</a>
									<%
									int showPages = 6;//显示10页
									if (showPages >= P_pageCount) {
										for (int i = 0; i < P_pageCount; i++) {
								%>
									<a class="<%=pageNo == (i + 1) ? "current" : ""%>" href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=(i + 1)%>"><%=(i + 1)%></a>
									<%
									}
									} else {
										int pindex = 0;
										if (pageNo > (showPages / 2))
											pindex = pageNo - (showPages / 2);
										if ((pageNo > P_pageCount - (showPages / 2)) && (pageNo <= P_pageCount))
											pindex = P_pageCount - showPages;
										for (int i = pindex; i < showPages + pindex; i++) {
								%>
									<a class="<%=pageNo == (i + 1) ? "current" : ""%>" href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=(i + 1)%>"><%=(i + 1)%></a>
									<%
									}
									}
								%>
									<a href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=(pageNo + 1)%>">下一页</a>
									<a href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=P_pageCount%>">尾页</a>
								</div>
							</td>
						</tr>
					</tfoot>
				</div>
			</div>
		</div>

		<div class="yxyj">
			<div class="yxyj_l_t">
				<div class="yxyj_l_t_left">
					<div style="float: left; margin-top: 17px; margin-left: 30px;">
						<span>查看：</span><span style="color: #ff6600">${articleInfo.browseNum} </span>
					</div>
					<div style="width: 1px; height: 30px; background: #f1f1f1; margin: auto; margin-top: 10px"></div>
					<div style="float: right; margin-right: 30px; margin-top: -23px;">
						<span>回复：</span><span style="color: #ff6600">${articleInfo.commentsNum}</span>
					</div>
				</div>
				<div class="yxyj_l_t_right">
					<div style="float: left; margin-left: 15px; margin-top: 18px">
						<span style="font-weight: bold; color: #000; font-size: 16px">【${themeInfo.themeName}】</span> <span style="font-size: 16px">${articleInfo.title}</span>（复制链接）
					</div>
					<div style="float: right; margin-right: 15px; margin-top: 15px;">
						<img src="imges/zuoyou.jpg">
					</div>
				</div>
			</div>
			<!-- 帖子原文内容 -->
			<%if(pageNo<2){ %>
			<div class="yxyj_l_content">
				<div class="yxyj_l_content">

					<div class="yxyj_l">
						<div style="margin-left: 80px; margin-top: 15px;">
							<img src="imges/touxiang.png">
						</div>
						<div style="margin-left: 80px;">
							${articleInfo.createName}<img style="vertical-align: sub; margin-left: 5px" src="imges/v1.jpg">
						</div>
						<div style="margin-top: 10px;">
							<div class="yxyj_l_zhuye">Ta的主页</div>
							<div class="yxyj_l_xinxi">发信息</div>
						</div>
					</div>

					<div class="yxyj_r">

						<div style="width: 700px; height: 35px; border-bottom: 1px solid #f1f1f1;">
							<div class="authi">
								<img style="vertical-align: middle" src="imges/tb1.png"> <span>发表于 ${articleInfo.createDate}</span> <span>|</span>
								<a href="" style="color: #666">只看该作者</a>
								<img style="vertical-align: middle; margin-left: 0px" src="imges/arw_r.gif">
							</div>
							<div class="authi1">顶楼</div>
						</div>
						<div class="yxyj_r_title">
							<img style="float: left; margin-left: 20px; margin-top: 15px;">
							<!-- src="imges/ad.png" -->
							<div class="yxyj_r_title_line">
								<span>广告位........... </span>
							</div>
						</div>

						<div class="yxyj_r_t_fsz">
							<table cellspacing="0" cellpadding="0">
								<tbody>
									<tr>
										<td class="t_f">
											${articleInfo.content}
											<!-- 帖子内容 -->
											<br>
											<br>
											<div class="yxyj_r_t_fsz_top">
												<div style="float: left">
													<table width="200" border="0">
														<tbody>
															<tr>
																<td>
																	<img src="imges/huifu.jpg">
																</td>
																<td>
																	<%if(StringUtil.isNotEmpty(mbIdV)) {%>
																	<a href="#" onclick="add('回复','frontArticleInfoController.do?replyOriginal&articleId=${articleInfo.id}','addReply')">回复</a>
																	<%}else{ %>
																	<a href="frontArticleInfoController.do?reply">回复</a>
																	<%} %>
																</td>

																<td>
																	<img src="imges/zhichi.png">
																</td>
																<td>支持</td>
																<td>
																	<img src="imges/fandui.png">
																</td>
																<td>反对</td>
															</tr>
														</tbody>
													</table>
												</div>
												<div style="float: right">
													<table width="130" border="0">
														<tbody>
															<tr>
																<td>
																	使用道具 <img style="vertical-align: middle;" src="imges/ar_t.png"> &nbsp;举报
																</td>
															</tr>
														</tbody>
													</table>
												</div>
											</div>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
					<div style="clear: both"></div>
				</div>
			</div>
			<%}  %>

			<!-- 评论内容 -->
			<c:forEach items="${articleCommentsList}" var="commentsList">
				<div class="yxyj_l_content">

					<div class="yxyj_l">
						<div style="margin-left: 80px; margin-top: 15px;">
							<img src="imges/touxiang.png">
						</div>
						<div style="margin-left: 80px;">
							${commentsList.createName}<img style="vertical-align: sub; margin-left: 5px" src="imges/v1.jpg">
						</div>
						<div style="margin-top: 10px;">
							<div class="yxyj_l_zhuye">Ta的主页</div>
							<div class="yxyj_l_xinxi">发信息</div>
						</div>
					</div>

					<div class="yxyj_r">

						<div style="width: 700px; height: 35px; border-bottom: 1px solid #f1f1f1;">
							<div class="authi">
								<img style="vertical-align: middle" src="imges/tb1.png"> <span>发表于 ${commentsList.createDate}</span> <span>|</span>
								<a href="" style="color: #666">只看该作者</a>
								<img style="vertical-align: middle; margin-left: 0px" src="imges/arw_r.gif">
							</div>
							<div class="authi1">${commentsList.floorNum}楼</div>
						</div>
						<div class="yxyj_r_title">
							<img style="float: left; margin-left: 20px; margin-top: 15px;">
							<!-- src="imges/ad.png" -->
							<div class="yxyj_r_title_line">
								<span>广告位........... </span>
							</div>
						</div>

						<div class="yxyj_r_t_fsz">
							<table cellspacing="0" cellpadding="0">
								<tbody>
									<tr>
										<td class="t_f">
											<!-- 引用开始 -->
											<c:if test="${commentsList.commentsType == '1'}">
												<div class="a_pr" style="margin-left: 10px; width: auto">
													<a href="" target="_blank">
														<img src="http://gtms03.alicdn.com/tps/i3/T1UuyyFMdbXXb6SDsI-120-240.jpg">
													</a>
												</div>
												<div class="quote">
													<blockquote>
														<font size="2"> <!-- 													<a href="http://bbs.china95.net/forum.php?mod=redirect&amp;goto=findpost&amp;pid=25602162&amp;ptid=2836860" target="_blank"> -->
															<a href="#" target="_blank">
																<font color="#999999">${commentsList.replyTitle}</font>
															</a>
														</font> <br> ${commentsList.replyContent}
													</blockquote>
												</div>
												<br>
											</c:if>
											<!-- 引用结束 -->
											${commentsList.commentsContent}
											<!-- 帖子内容 -->

											<br>
											<br>
											<div class="yxyj_r_t_fsz_top">
												<div style="float: left">
													<table width="200" border="0">
														<tbody>
															<tr>
																<td>
																	<img src="imges/huifu.jpg">
																</td>
																<td>
																	<%if(StringUtil.isNotEmpty(mbIdV)) {%>
																	<a href="#" onclick="add('回复','frontArticleInfoController.do?reply&plId=${commentsList.id}','addReply')">回复</a>
																	<%}else{ %>
																	<a href="frontArticleInfoController.do?reply">回复</a>
																	<%} %>
																</td>
																<td>
																	<img src="imges/zhichi.png">
																</td>
																<td>支持</td>
																<td>
																	<img src="imges/fandui.png">
																</td>
																<td>反对</td>
															</tr>
														</tbody>
													</table>
												</div>
												<div style="float: right">
													<table width="130" border="0">
														<tbody>
															<tr>
																<td>
																	使用道具 <img style="vertical-align: middle;" src="imges/ar_t.png"> &nbsp;举报
																</td>
															</tr>
														</tbody>
													</table>
												</div>
											</div>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
					<div style="clear: both"></div>
				</div>
			</c:forEach>


		</div>

		<!-- 》》》》》》》》》》》》》》》》》》》 分  页 《《《《《《《《《《《《《《《《《《《《《《《《《  -->
		<div class="pgt" style="margin-top: 10px">
			<div class="pgt_img">
				<img src="imges/fatie.jpg">
			</div>
			<div class="pg">
				<tfoot>
					<!-- 分页 -->
					<tr>
						<td colspan="4" class="align_c">
							<div class="_page">
								<%
// 								int pageNo = 0, bfNo = 0;
// 								String groupId = request.getParameter("groupId");
// 								String pageNoStr = request.getParameter("page");
								if (StringUtil.isEmpty(pageNoStr) || "1".equals(pageNoStr)) {
									pageNo = 1;
									bfNo = 1;
								} else {
									pageNo = Integer.parseInt(pageNoStr);
									bfNo = pageNo - 1;
								}
// 								String annCount = request.getAttribute("pageCount").toString();
// 								int P_pageCount = Integer.parseInt(annCount);
							%>
								<span id="info">共${pageCount }页|第<%=pageNo%>页
								</span>
								<a href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=1">首页</a>
								<a href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=bfNo%>">上一页</a>
								<%
// 								int showPages = 6;//显示10页
								if (showPages >= P_pageCount) {
									for (int i = 0; i < P_pageCount; i++) {
							%>
								<a class="<%=pageNo == (i + 1) ? "current" : ""%>" href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=(i + 1)%>"><%=(i + 1)%></a>
								<%
								}
								} else {
									int pindex = 0;
									if (pageNo > (showPages / 2))
										pindex = pageNo - (showPages / 2);
									if ((pageNo > P_pageCount - (showPages / 2)) && (pageNo <= P_pageCount))
										pindex = P_pageCount - showPages;
									for (int i = pindex; i < showPages + pindex; i++) {
							%>
								<a class="<%=pageNo == (i + 1) ? "current" : ""%>" href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=(i + 1)%>"><%=(i + 1)%></a>
								<%
								}
								}
							%>
								<a href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=(pageNo + 1)%>">下一页</a>
								<a href="frontArticleInfoController.do?articleInfoList&Id=<%=Id%>&page=<%=P_pageCount%>">尾页</a>
							</div>
						</td>
					</tr>
				</tfoot>
			</div>
		</div>

		<link rel="stylesheet" href="css/style_1_common.css">
		<div id="f_pst" class="bm" style="width: 960px; margin: 0 auto;">
			<div class="bm_c">
				<form method="post" autocomplete="off" id="fastpostform" action="frontArticleInfoController.do?sendComments">
					<div id="fastpostreturn" style="margin: -5px 0 5px"></div>

					<td class="pls"></td>

					<div class="cl">
						<input id="articleId" name="articleId" type="hidden" value="${articleInfo.id}">
						<div class="tedt" style="width:100%;border:0px;margin-bottom: 10px;">
							<script type="text/plain" id="myEditor" name="content" style="width:100%;height:200px;">
							</script>
						</div>  
						<div id="seccheck_fastpost"></div>
					</div>
					<p class="pnpost">
						<button id="save_acticle" name="save_acticle" tabindex="13" type="submit" style="font-size:12px;font-weight: bold;color:white;background-color: #0090ee;height:30px;line-height: 30px;border:0px;">
							<strong>发表回复</strong>
						</button>
					</p>
				</form>
			</div>
		</div>

		<div style="clear: both"></div>



	</div>

	<!--foot -->
	<%@include file="foot.jsp"%>

</body>
</html>
<script type="text/javascript">
//实例化编辑器
var um = UM.getEditor('myEditor');
um.addListener('blur',function(){
    $('#focush2').html('编辑器失去焦点了')
});
um.addListener('focus',function(){
    $('#focush2').html('')
});

</script>